Repository navigation
chore: update rhiza to v1.4.2 - #936
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the repository’s Rhiza template integration from v1.3.4 → v1.4.2, replacing the removed synced Makefile layer with a lightweight rhiza-task-backed shim and re-homing previously Makefile-carried gate settings into pyproject.toml.
Changes:
- Bump Rhiza template/ref pins to v1.4.2 (template metadata + reusable workflow callers).
- Reintroduce local developer UX via a shim
Makefiledelegating torhiza-task, and move prior gate settings into[tool.rhiza-task]. - Preserve architectural import contracts by running import-linter via pre-commit; add paper bundle docs.
Reviewed changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds [tool.rhiza-task] settings to preserve prior gate behavior after make-layer removal. |
| Makefile | Replaces deleted synced make layer with a uvx rhiza-task shim + path-shadow guards. |
| docs/paper/README.md | Adds documentation for the paper bundle layout/targets/config. |
| .rhiza/template.yml | Updates Rhiza template ref to v1.4.2. |
| .rhiza/template.lock | Updates locked Rhiza ref/sha, reflects removed make-layer files, adds paper README to synced set. |
| .pre-commit-config.yaml | Adds local hook to enforce import-linter architectural contracts under CI pre-commit gate. |
| .github/workflows/rhiza_paper.yml | Bumps reusable workflow pin to v1.4.2. |
| .github/workflows/rhiza_mutation.yml | Bumps reusable workflow pin to v1.4.2. |
| .github/workflows/rhiza_marimo.yml | Bumps reusable workflow pin to v1.4.2. |
| .github/workflows/rhiza_codeql.yml | Bumps reusable workflow pin to v1.4.2. |
| .github/workflows/rhiza_ci.yml | Bumps reusable workflow pin to v1.4.2. |
| .github/workflows/rhiza_book.yml | Bumps reusable workflow pin to v1.4.2. |
| .github/workflows/rhiza_benchmark.yml | Bumps reusable workflow pin to v1.4.2. |
| .rhiza/rhiza.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/test.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/quality.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/python.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/paper.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/marimo.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/github.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/doctor.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/custom-task.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/custom-env.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/bootstrap.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/make.d/book.mk | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/.gitignore | Deleted (no longer shipped in Rhiza >= v1.4.0). |
| .rhiza/.env | Deleted (no longer shipped in Rhiza >= v1.4.0). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+56
to
+62
| The folder is `docs/paper` by default. Point the tasks somewhere else with a | ||
| `paper-folder` setting: | ||
|
|
||
| ```toml | ||
| [tool.rhiza-task] | ||
| paper-folder = "manuscript" | ||
| ``` |
| # so an overridden `UVX=/somewhere/uvx` provisions /somewhere rather than silently | ||
| # downloading to ./bin and then running nothing. | ||
| $(UVX): | ||
| @echo "[INFO] uv not found; installing into $(@D)" |
The make layer's print-% target went with rhiza v1.4.0, so the test's 'make -s print-COVERAGE_FAIL_UNDER' probe exited 2 and failed the suite on every Python. Read the value from the committed TOML instead, where the setting now lives, and assert [tool.coverage.report] fail_under alongside it since the command-line --cov-fail-under outranks the config file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrates this repo from rhiza v1.3.4 to v1.4.2.
v1.4.0 stopped shipping the make layer, so this is not an ordinary
/rhiza:update. Thesync deleted
Makefile,.rhiza/rhiza.mk, all eleven.rhiza/make.d/*.mkfragments and.rhiza/.env— and the settings those files carried are not therhiza-taskCLI'sdefaults. Recovering them is the substance of this PR; the version bump is the easy part.
Sync result: 8 files merged, 15 deleted, no conflicts (nothing to take from upstream),
no
.rejfiles. All 15 deletions were verified template-owned at the old ref, so norepo-owned file was lost to the delete pass.
docs/paper/README.mdis new from thegithub-papertemplate.Settings recovered into
[tool.rhiza-task]coverage_fail_under100(custom-env.mk)90100[tool.coverage.report] fail_underdoes not cover it —testpasses--cov-fail-underon the command line, which outranks the config file.typecheckerboth(python.mk)tybothmypy --strictstops running entirely. Also now stricter: the old shellcaselet mypy's status win, so atyfailure could pass.marimo_folderbook/marimo/notebooks(.rhiza/.env)docs/notebooksbook/marimo/notebooksmarimo-validatefinds no notebooks; the folder also drops out of the deptry scan, taking themarimodev dependency with it.pytest_rhiza0.2.1(RHIZA_CHECKS_VERSION,quality.mk)pytest-rhiza @ git+…@v0.2.0pytest-rhiza==0.2.1deptry_ignoreDEPTRY_FOLDERS += api(Makefile)["api"]ci / depsgoes red — see below.DEPTRY_FOLDERS += api— the one with no direct equivalentv1.4.0 removed the
DEPTRY_FOLDERSaccumulator and now derives the deptry folder set(
source_folderplusmarimo_folder), with no setting to extend it. Reproduced locally:without
api/in scope, deptry reportsDEP002 'fastapi' defined as a dependency but not used in the codebase, so thedepsgate fails.The
depstask appendsdeptry_ignoreto deptry's argv after the derived folders, anddeptry takes multiple roots positionally — so a bare path there restores the previous scope
exactly. Verified through the real CLI:
uvx rhiza-task@0.3.1 deps→ok deps, 70 filesscanned, matching the pre-migration scope.
Suppressing the finding with a
per_rule_ignoresentry would have been the weaker fix: itwould also stop flagging
fastapiifapi/ever genuinely stopped importing it. The stalecomment in
[tool.deptry.per_rule_ignores]that pointed at the deletedDEPTRY_FOLDERSline has been repointed.
Not migrated, on purpose
Matching the CLI default already:
source_folder,tests_folder,uv_sync_args,license_fail_on,book_output,zensical_version,paper_folder. Also left unset, eachwith the reason recorded in
pyproject.toml:mkdocs_extra_packages— the old Makefile set--with 'mkdocstrings[python]', now thedefault. Naming the setting replaces the default list, so restating it invites someone
to append a package and silently drop mkdocstrings.
license_ignore_packages—marimo.mkappendeddocutils; rhiza-task adds it itselfwhen the marimo tasks are registered.
ci_os_matrix—.rhiza/.envdocumented leaving this unset sorhiza_ci.ymlpicks thematrix per caller. Pinning it here would defeat that.
layers/rhiza_checks— both derived.layerscomes from the manifests present(
pyproject.toml→python), and the check set follows from it, still yielding allfive checks the make accumulators built up (the
RHIZA_CHECKS +=lines inpython.mk,quality.mkandtest.mkare fully covered byNEUTRAL_RHIZA_CHECKS+ the pythonlayer).
PROJECT_NAME_EXTRAandLOG_LEVELfromcustom-env.mkwere cosmetic and have no CLIequivalent.
Two gates that needed more than a setting
1. The architectural import contracts. The old Makefile ran import-linter from an
archtarget hooked in withtest:: arch, which made it a CI gate only because v1.3.xCI ran
make test. v1.4.2'srhiza_ci.ymlrunsuvx "$RHIZA_TASK" testdirectly, so aMakefile hook no longer reaches CI at all — the
[tool.importlinter]contracts would havegone unchecked while every job stayed green.
Moved to a
repo: localpre-commit hook, which runs underrhiza-task fmt— what theci / Pre-commit hooksjob executes. It usesuv run --with import-linter lint-imports,the same command the
archtarget used: an isolatedlanguage: pythonhook fails withCould not find package 'jquantstats' in your Python path, because import-linter resolvesroot_packageby importing it and needs the project itself available.Verified it can actually fail, not just pass: injecting a forbidden
from jquantstats.data import Datainto_stats/_basic.pygivesContracts: 1 kept, 1 broken, and it returns to green once reverted.2. Two task names shadowed by paths in this repo. The shim routes unknown targets
through a
%:match-anything rule, which make only applies when it cannot resolve thetarget as a file. This repo has a
book/directory and alicensefile at the root, andboth
bookandlicenseare task names — somake bookandmake licenseresolved tothe path and printed "is up to date" without running the gate.
Note
.PHONYalone is not the fix, and it fails in the direction that looks fine: makenever applies a match-anything rule to a phony target, so declaring them phony and stopping
there yields
Nothing to be done for 'book'— still a silent pass. They get an explicitforwarding rule as well, with
.PHONYon top.docs/needs no guard: the task isdocs-coverageand nothing is calleddocs.The restored
Makefileis otherwise the stockuvx rhiza-task shim.MKDOCS_EXTRA_PACKAGESand
DEPTRY_FOLDERSfrom the old one are handled above and are not carried into it.Exclude list
Left unchanged. All three entries (
rhiza_fuzzing.yml,rhiza_weekly.yml,rhiza_scorecard.yml) are already in working destination form rather than the deadclone-relative
bundles/github/...spelling, and v1.4.2 still ships all three, so each islive and doing its job. The exclude sweep found all three paths absent — nothing left
behind by an earlier sync, tracked or untracked. Nothing was added: the house set would
have excluded and deleted
rhiza_mutation.yml,.github/CONFIG.md,.github/ISSUE_TEMPLATEand
.github/DISCUSSION_TEMPLATE, all of which are tracked and present here — an editorialcall, not part of a version bump. The
chore: delete the newly excluded template filescommit is therefore absent, as there was nothing to delete.
Worth a look, not fixed here
FUZZING_ENABLED=trueis set as a repository variable, butrhiza_fuzzing.ymlisexcluded and absent — so nothing fuzzes. Pre-existing, unrelated to this bump, and the
fix is a decision either way (drop the variable, or drop the exclusion and let the sync
deliver the caller).
CLAUDE.mdis now stale and is repo-owned documentation, so it belongs in its own PR:it cites
COVERAGE_FAIL_UNDER = 100in.rhiza/make.d/custom-env.mk(that file is gone —the value now lives in
[tool.rhiza-task]), describes the Makefile as including.rhiza/rhiza.mk, still says templatev1.2.0, and lists amake deptrytarget whoseactual name is
deps.RHIZA_TASKin the shim isrhiza-task@0.3.1, matching the pinrhiza_ci.yml@v1.4.2uses for every gate step — so local
makeand CI run the same code. No divergence toreport.
setup-uvstep, so the block is arguably dead weight, but it only fires whenuvxisabsent and removing it is a repo-owned change for its own PR.
Gates
No gates were run —
/rhiza:qualityproduces the scorecard. The exceptions are the twochecks used as evidence above:
uvx rhiza-task deps(to prove theapi/scope regressionand its fix) and
uvx prek run import-linter --all-files(to prove the arch gate bothpasses and can fail).
make fmtwas deliberately not run, as it would rewrite repo-ownedfiles.
CI caught one more regression
The first push went red on all four Python versions, plus
book / buildandLowest-direct dependency compatibility— 13 failing checks, all one root cause:tests/test_jquantstats/test_coverage_gate.pyexisted to guard exactly the setting thisPR migrates — it read the value back through
make -s print-COVERAGE_FAIL_UNDER, and themake layer's
print-%target went with v1.4.0.book / buildfailed asblocked: prerequisite failed: test, and the lowest-direct job runs the same suite, whichaccounts for all 13.
Worth noting what the log showed around the failure:
--cov-fail-under=100was on thepytest command line and
Required test coverage of 100% reached— so the recoveredcoverage_fail_underwas already working. Only the test's probe was stale.Rewritten to read
[tool.rhiza-task] coverage_fail_understraight from the committed TOMLvia
tomllib— no subprocess, nouvx, no network. It also now asserts[tool.coverage.report] fail_underalongside it, because the two are independent: thecommand-line
--cov-fail-underoutranks the config file, so a barepytestrun and arhiza-task testrun would enforce different numbers if they ever drifted apart.Verified the guard still bites: commenting the setting out gives
AssertionError: [tool.rhiza-task] has no coverage_fail_under — the gate silently falls back to rhiza-task's default of 90%, and it returns to green when restored.Final CI state: 49 pass, 0 fail. The two
skippingentries are expected —mutationis gated on a repository variable that is not set, and
book / deployonly runs aftermerge.